﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AngleExpress.viewmodel
{
    class NotifysViewModel: NotifyBase
    {
        public ObservableCollection<NotifyMsg> NotifyList
        {
            get
            {
                return notifyList;
            }
            set
            {
                notifyList = value;
                RaisePropertyChanged();
            }
        }
        public string CurTitle
        {
            get
            {
                return curTitle;
            }
            set
            {
                curTitle = value;
                RaisePropertyChanged();
            }
        }
        public string CurContent
        {
            get
            {
                return curContent;
            }
            set
            {
                curContent = value;
                RaisePropertyChanged();
            }
        }
        public string CurCreateTime
        {
            get
            {
                return curCreateTime;
            }
            set
            {
                curCreateTime = value;
                RaisePropertyChanged();
            }
        }
        public ShowWhat Show
        {
            get
            {
                return show;
            }
            set
            {
                show = value;
                RaisePropertyChanged();
            }
        }

        private ObservableCollection<NotifyMsg> notifyList = new ObservableCollection<NotifyMsg>();
        private string curTitle;
        private string curContent;
        private string curCreateTime;
        private ShowWhat show;
    }

    public class NotifyMsg: NotifyBase
    {
        public string ID
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged();
            }
        }
        public string Title
        {
            get { return title; }
            set
            {
                title = value;
                RaisePropertyChanged();
            }
        }
        public string Content
        {
            get { return content; }
            set
            {
                content = value;
                RaisePropertyChanged();
            }
        }
        public string CreateTime
        {
            get { return createTime; }
            set
            {
                createTime = value;
                RaisePropertyChanged();
            }
        }

        private string id;
        private string title;
        private string content;
        private string createTime;
    }

    public enum ShowWhat
    {
        Table,
        Detail
    }
}
